<!-- 认证 -->
<script id="tpl-detail" type="text/template">
    <div class="am-padding-xs am-padding-top-sm">
        <input type="hidden" value="{{ model.business_code }}" name="data[business_code]">
        <input type="hidden" value="{{ model.apply_mode.value }}" name="data[apply_mode]">
        {{ if(model.apply_mode.value != 40) }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">营业执照 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <input type="hidden" value="{{ model.details.license_copy.value }}" name="data[details][license_copy]">
                    <a href="{{ model.details.license_copy.url }}" target="_blank">
                        <img src="{{ model.details.license_copy.url }}" />
                    </a>
                </div>
            </div>
        </div>
		<div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">执照类型 </label>
            <div class="am-u-sm-9 am-u-end">
                <label class="am-radio-inline">
                    <input type="radio" name="data[details][subject_type]" value="SUBJECT_TYPE_INDIVIDUAL" data-am-ucheck 
                    {{ model.details.subject_type == 'SUBJECT_TYPE_INDIVIDUAL' ? 'checked' : '' }}> 个体
                </label>
                <label class="am-radio-inline">
                    <input type="radio" name="data[details][subject_type]" value="SUBJECT_TYPE_INSTITUTIONS" data-am-ucheck 
                    {{ model.details.subject_type == 'SUBJECT_TYPE_INSTITUTIONS' ? 'checked' : '' }}> 公司
                </label>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">执照名称 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.merchant_name }}" name="data[details][merchant_name]" required>
                <small>营业执照上的公司名称或经营门店名称</small>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">统一社会信用代码 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.license_number }}" name="data[details][license_number]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <input type="hidden" value="{{ model.details.id_card_copy.value }}" name="data[details][id_card_copy]">
                    <a href="{{ model.details.id_card_copy.url }}" target="_blank">
                        <img src="{{ model.details.id_card_copy.url }}" />
                    </a>
                </div>
                <div class="apply-img">
                    <input type="hidden" value="{{ model.details.id_card_national.value }}" name="data[details][id_card_national]">
                    <a href="{{ model.details.id_card_national.url }}" target="_blank">
                        <img src="{{ model.details.id_card_national.url }}" />
                    </a>
                </div>
            </div>
        </div>
        {{ /if }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证姓名 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.id_card_name }}" name="data[details][id_card_name]" required>
            </div>
        </div>
        {{ if(model.apply_mode.value != 40) }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证号码 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.id_card_number }}" name="data[details][id_card_number]" required>
            </div>
        </div>
        {{ /if }}
        {{ if(model.apply_mode.value == 30) }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">居住地址 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.id_card_address }}" name="data[details][id_card_address]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证有效期开始时间 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.card_period_begin }}" name="data[details][card_period_begin]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">身份证有效期结束时间 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.card_period_end }}" name="data[details][card_period_end]" required>
            </div>
        </div>
        {{ if(model.details.qualifications.url != '') }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">特殊资质 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <input type="hidden" value="{{ model.details.qualifications.value }}" name="data[details][qualifications]">
                    <a href="{{ model.details.qualifications.url }}" target="_blank">
                        <img src="{{ model.details.qualifications.url }}" />
                    </a>
                </div>
            </div>
        </div>
        {{ /if }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">门头照片 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <input type="hidden" value="{{ model.details.store_entrance_pic.value }}" name="data[details][store_entrance_pic]">
                    <a href="{{ model.details.store_entrance_pic.url }}" target="_blank">
                        <img src="{{ model.details.store_entrance_pic.url }}" />
                    </a>
                </div>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">店内照片 </label>
            <div class="am-u-sm-9 am-u-end">
                <div class="apply-img">
                    <input type="hidden" value="{{ model.details.indoor_pic.value }}" name="data[details][indoor_pic]">
                    <a href="{{ model.details.indoor_pic.url }}" target="_blank">
                        <img src="{{ model.details.indoor_pic.url }}" />
                    </a>
                </div>
            </div>
        </div>
        <input type="hidden" value="{{ model.app_id }}" name="data[app_id]">
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">门店名称 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.merchant_shortname }}" name="data[details][merchant_shortname]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">门店地址 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.biz_store_address }}" name="data[details][biz_store_address]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">门店所在省市编码 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.biz_address_code }}" name="data[details][biz_address_code]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">开户银行 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.account_bank }}" name="data[details][account_bank]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">开户银行所在省市编码 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.bank_address_code }}" name="data[details][bank_address_code]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">银行账号 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="number" class="tpl-form-input" value="{{ model.details.account_number }}" name="data[details][account_number]" required>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">电子邮箱 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.contact_email }}" name="data[details][contact_email]" required>
            </div>
        </div>
        {{ /if }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系电话 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="number" class="tpl-form-input" value="{{ model.details.mobile_phone }}" name="data[details][mobile_phone]" required>
            </div>
        </div>
        {{ if(model.apply_mode.value == 10 || model.apply_mode.value == 20)  }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">微信号 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.details.legal_persona_wechat }}" name="data[details][legal_persona_wechat]" required>
            </div>
        </div>
        {{ /if }}
        {{ if(model.apply_mode.value == 40) }}
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">代理级别 </label>
            <div class="am-u-sm-9 am-u-end">
                <label class="am-radio-inline">
                    <input type="radio" name="data[agent_mode]" value="10" data-am-ucheck 
                    {{ model.agent_mode.value == 10 ? 'checked' : '' }}> 县区
                </label>
                <label class="am-radio-inline">
                    <input type="radio" name="data[agent_mode]" value="20" data-am-ucheck 
                    {{ model.agent_mode.value == 20 ? 'checked' : '' }}> 市级
                </label>
                <label class="am-radio-inline">
                    <input type="radio" name="data[agent_mode]" value="30" data-am-ucheck 
                    {{ model.agent_mode.value == 30 ? 'checked' : '' }}> 省级
                </label>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">代理区域 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.province }}{{ model.city }}{{ model.district }}" disabled>
            </div>
        </div>
        {{ /if }}
        <div class="widget-head am-cf">
            <div class="widget-title am-fl">执行操作</div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label">驳回原因 </label>
            <div class="am-u-sm-9 am-u-end">
                <input type="text" class="tpl-form-input" value="{{ model.reject }}" name="data[reject]" {{ model.apply_status.value !=10 ? 'disabled' : '' }}>
            </div>
        </div>
        <div class="am-form-group">
            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">{{ model.apply_status.value == 10?'操作动作':'当前状态' }} </label>
            <div class="am-u-sm-9 am-u-end">
                {{ if model.apply_status.value == 10 }}
                <label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="10" data-am-ucheck checked> 保存
                </label>
                {{ if(model.apply_mode.value == 10 || model.apply_mode.value == 30) }}
                <label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="20" data-am-ucheck> 提交审核
                </label>
                {{ else/ }}
                <label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="30" checked data-am-ucheck> 审核成功
                </label>
                {{ /if }}
                <label class="am-radio-inline">
                    <input type="radio" name="data[apply_status]" value="40" data-am-ucheck> 资料驳回
                </label>
                {{ else/ }}
                    <input type="text" value="{{ model.apply_status.text }}" disabled>
                {{ /if }}
                
            </div>
        </div>
    </div>   
</script>

